/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package DAO;

import DAO.Financial.*;

/**
 *
 * @author Sebastian
 */
public class DAOFactory {

  // List of DAO types supported by the factory
  public static final int COMPANY = 1;
  public static final int DATE = 2;
  public static final int MARKET = 3;
  public static final int QUOTE = 4;
  public static final int STOCK = 5;
  
public static DAOFinancial getDAOFinancial(
      int whichFactory) {
  
    switch (whichFactory) {
      case COMPANY: 
          return new CompanyDAO();
      case DATE    : 
          return new DateDAO();      
      case MARKET    : 
          return new MarketDAO();
      case QUOTE :
          return new QuoteDAO();
      case STOCK:
          return new StockDAO();
      default: 
          return null;
    }
  }
}